1. Field of the Invention
The present invention relates to digital image processing and, in particular, to unsharp masking techniques for crispening edges.
2. Discussion of the Related Art
Images are sometimes displayed or printed on an output device (e.g. printer, terminal etc) using closely spaced dots, each such dot referred to as a "pixel". Such images, known as digital images, are typically stored in a storage device (such as a conventional computer memory) as a sequence of binary integers, where each integer is a sequence of zeroes and ones (such as the sequence "01101101") and specifies for a corresponding pixel one of a fixed number of intensities at which the pixel is to be displayed. For example, if each integer is allocated 8 bits, then one of 256 intensities can be specified.
Several image enhancement techniques have been developed to accentuate, or sharpen, various features of digital images such as edges and boundaries. One such technique, known as unsharp masking, is commonly used in the printing industry to crispen edges (i.e. to enhance the contrast between the dark and light areas which define an edge). The process of unsharp masking typically comprises the following three steps:
1) Blurring the original image, thereby removing high frequency components of the original image. PA1 2) Subtracting the blurred image from the original image, thereby creating a differential image in which low frequency components of the original image have been subtracted out. This provides enhanced contrast on the dark-light transitional area (edges) and, thus, gives the impression of enhanced sharpness. PA1 3) Adding some real multiple, .lambda., of the differential image to the original image. The choice of .lambda. reflects a tradeoff between the goal of removing low frequency image components in order to enhance edges (favored by a large value for .lambda.) and the goal of preserving the resemblance between the original image and the final sharpened image (favored by a small value for .lambda.). The preferred value for .lambda. is application specific and, thus, the setting of .lambda. is typically under user control.
This process of unsharp masking can, thus, be described by the equation EQU V=U+.lambda.(U-B),
where U represents the original unsharpened image, B represents a blurred version of image U, V represents the final sharpened image and .lambda. is greater than zero. The most time consuming step in the above unsharp masking process is that of producing a blurred image.
Neighborhood operations are often used to form the blurred image, required for unsharp masking, from the original unsharpened image. A neighborhood operation computes the value for a pixel in the blurred image from the values of the pixel and some (e.g. the eight closest) neighboring pixels in the original unsharpened image. For example, the neighborhood averaging method computes the value for a pixel in the blurred image by averaging the values in the original image of that pixel and of some neighboring pixels.
While neighborhood operations using a small neighborhood may efficiently compute a blurred image, such blurring methods possess the undesirable property of computing the value for each pixel in the blurred image only on the basis of the values of a few of the pixels in the original unsharpened image. As a result, the edge crispening achieved in the final sharpened image may not be satisfactory.
One solution to this problem involves the use of a larger neighborhood. For example, a Gaussian smoothing filter could be used (as described, for example, at pages 127-8 in Lewis, R. (1990) Practical Digital Image Processing, Ellis Horwood). One possible blurring method using a Gaussian filter computes a value for each pixel in the blurred image from a weighted sum of the values of some or all the pixels in the original image. The weight applied to a particular pixel value in the original image in calculating the value of a pixel in a blurred image is given by the quantity Ae.sup.-(r.spsp.2.sup./2.sigma..spsp.2.sup.), where A and .sigma. are constants and r is the distance between the particular pixel and the pixel whose value in the blurred image is being computed.
Unfortunately, neighborhood operations using a large neighborhood (such as the Gaussian technique described above) may require excessive computation. What is needed is an efficient method for blurring (preferably whose computation time is linear in the number of pixels in the original image) where the value of each pixel of the blurred image depends on the value of every pixel in the original unsharpened image and the quality of the blurred image is of adequate quality, at least for the purposes of sharpening.